/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
 */

package model

import "time"

/*
* UserId 用户ID
* CloudUserId 云上用户ID
* CreditAmount 可用信用额度
* CreditDebtAmount 欠费的信用额度
* Currency 币种,CNY
* CreditStatus 账户信用额度可用状态,true为正常，false为欠费
* ExpireTime 额度ExpireTime到期时间
 */

type Credit struct {
	UserId           string    `orm:"column(user_id);size(64);index;pk"`
	CloudUserId      string    `orm:"column(cloud_user_id);size(64);"`
	CreditAmount     float64   `orm:"column(credit_amount);digits(17);decimals(2)"`
	CreditDebtAmount float64   `orm:"column(credit_debt_amount);digits(17);decimals(2)"`
	Currency         string    `orm:"column(currency);size(10)"`
	CreditStatus     bool      `orm:"column(credit_status);type(boolean)"`
	ExpireTime       time.Time `orm:"column(expire_time);size(datetime)"`
}
